import request from '@/utils/request'

// 查询医生管理列表
export function listDoctoruser(query) {
  return request({
    url: '/system/doctoruser/list',
    method: 'get',
    params: query
  })
}

// 查询医生管理详细
export function getDoctoruser(id) {
  return request({
    url: '/system/doctoruser/' + id,
    method: 'get'
  })
}

// 新增医生管理
export function addDoctoruser(data) {
  return request({
    url: '/system/doctoruser',
    method: 'post',
    data: data
  })
}

// 修改医生管理
export function updateDoctoruser(data) {
  return request({
    url: '/system/doctoruser',
    method: 'put',
    data: data
  })
}

// 删除医生管理
export function delDoctoruser(id) {
  return request({
    url: '/system/doctoruser/' + id,
    method: 'delete'
  })
}

// 导出医生管理
export function exportDoctoruser(query) {
  return request({
    url: '/system/doctoruser/export',
    method: 'get',
    params: query
  })
}

// 用户密码重置
export function resetUserPwd(id, password) {
  const data = {
    id,
    password
  }
  return request({
    url: '/system/doctoruser/resetPwd',
    method: 'put',
    data: data
  })
}
// 科室List
export function officeListAll(query) {
  return request({
    url: '/system/office/listAll',
    method: 'get',
    params: query
  })
}
